
import { defineStore } from 'pinia';

export const useChatStore = defineStore('chat', {
  state: () => ({
    // agentId:1, //测试
    agentId: process.env.NODE_ENV == 'development' ? 1 : 2,  //正式
    isDeepThink: false,
    isNetworking: false,
  }),
  actions: {
    // 设置agentId
    setAgentId(newAgentId) {
      this.agentId = newAgentId;
    },
    setIsDeepThink(newIsDeepThink) {
      this.isDeepThink = newIsDeepThink;
    },
    setIsNetworking(newIsNetworking) {
      this.isNetworking = newIsNetworking;
    },
    // 清除agentId
    clearAgentId() {
      this.agentId = '';
    }
  }
});
